package com.mc.lp.database.service.handler.event;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

import org.apache.log4j.Logger;

/**
 * abstract class for IEvent; all client event classes will give its implementation based on their requirement.
 * @author deepak
 */
public abstract class AbstractEvent<T> implements IEvent{
	private Class<T> clazz;
	public Logger LOG = null;
	@SuppressWarnings("unchecked")
	public AbstractEvent() {
		Type type = getClass().getGenericSuperclass();
		ParameterizedType paramType = (ParameterizedType) type;
		clazz = (Class<T>) paramType.getActualTypeArguments()[0];
		initLogger();
	}
	
	private void initLogger(){
		LOG= Logger.getLogger(this.clazz);
	}
	
	
}
